<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Strict.dtd">
<html>
	<head>
		<title>JS graphics</title>

		<link rel="stylesheet" type="text/css" href="graphics.css"/>
		<script type="text/javascript" src="windowing.js"></script>
		<script type="text/javascript" src="enum.js"></script>
		<script type="text/javascript" src="bargraph.js"></script>
		<script type="text/javascript" src="graphics.js"></script>
	</head>

	<body>
		<!--Always keep your DynamicAttacher on top!-->
		<div id="DynamicAttacher"></div>
        Leonardo Test
	</body>
</html>

<script>

var dynamicAttacherObj;

function onInit( ) {
	dynamicAttacherObj = document.getElementById('DynamicAttacher');
	
	var item1 = new BarChartItem('Cow', 5900);
	var item2 = new BarChartItem('Dog', 500);
	var item3 = new BarChartItem('Cat', 1000);
	var item4 = new BarChartItem('Human', 11000);
    var item5 = new BarChartItem('Pig', 900);
    
	var graph = new BarGraph('theGraph');
	graph.Add(item1);
	graph.Add(item2);
	graph.Add(item3);
	graph.Add(item4);
	graph.Add(item5);
    
	graph.SetHeight(500);
	graph.SetWidth(800);
    
	// graphics.ShowOutline = true;
	
	graph.Title = 'THIS IS THE TITLE';

	graph.SetTitleLocation(10, 10);

	graph.ShowGraphBorder = true;
	graph.GraphBorder = Border.ThreeD;
	graph.GraphBorderColor = '#00979C';

	graph.ShowGrid = true;
	graph.BarBorder = Border.ThreeD;
	graph.GridStyle = Border.Dotted;
	graph.GridColor = '#335';

	graph.ShowShadow = false;
	graph.ShadowColor = Color.Green;
	graph.ShadowXOffset = 3;
	graph.ShadowYOffset = 3;

	graph.BarThickness = 100;
	graph.BarWidth = 10;
	graph.Label = ' Hz';

	graph.ShowValues = true;
	graph.ValueFont = new Font('Arial', '9pt', '#333');

	graph.ShowText = true;
	graph.NameFont = new Font('Arial', '9pt', '#333');

	graph.ShowTitle = true;
	graph.TitleFont = new Font('Arial', '9pt', '#333');

	graph.Generate( );
	graph.SetLocation(100, 10);
	graph.Attach(dynamicAttacherObj);



	AddMovement(dynamicAttacherObj);
}




if(window.addEventListener) {
	window.addEventListener('load', function(evt) {
		onInit( );
	}, false);
}
else if(window.attachEvent) {
	window.attachEvent('onload', function(evt) {
		onInit( );
	});
}



</script>

